package tech.summerly.weather.component.adapter.floors

import android.support.annotation.LayoutRes
import android.view.LayoutInflater
import android.view.ViewGroup
import me.drakeet.multitype.ItemViewBinder
import tech.summerly.weather.component.adapter.WeatherTowerAdapter
import tech.summerly.weather.util.ViewHolder

abstract class BaseFloor<T>() : ItemViewBinder<T, ViewHolder>() {


    companion object {

        fun createHolder(@LayoutRes id: Int, inflater: LayoutInflater, parent: ViewGroup): ViewHolder {
            val inflated = inflater.inflate(id, parent, false)
            return ViewHolder(inflated)
        }
    }


    protected fun getTowerAdapter(): WeatherTowerAdapter = adapter as WeatherTowerAdapter


}